#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
	int i;
	int sum=1;
	int n;
	int ret = 0;
	scanf("%d", &n);
	for (i = 1; i <= n; i++)
	{
		sum *= i;
		ret += sum;
	}
	printf("%d", ret);
	return 0;
}